home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2793 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: EU.net!sun4nl!xs4all!marketgraph!rvg
  2. From: rvg@marketgraph.xs4all.nl (Ruud van Gaal)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: C compiler problem
  5. Message-ID: <3138mbj60.alamito@marketgraph.xs4all.nl>
  6. Date: Mon, 5 Feb 96 12:56:49 CET
  7. References: <4ek3b2$a5k@nntp.novia.net> <3005pbd60.alamito@marketgraph.xs4all.nl> <4eqe9n$jsa@odin.diku.dk> <DM5I1y.J46@unx.sas.com>
  8. Reply-To: rvg@marketgraph.xs4all.nl
  9. X-Newsreader: Alamito Mail and News Manager (V2.0.4 for Waffle) registered to MARKETGRAPH VISUAL AUTOMATION
  10.  
  11. In <DM5I1y.J46@unx.sas.com> walker@chang.unx.sas.com (Doug Walker) wrote:
  12.  
  13. >>>>int main()
  14. >>>void main(void) is better prototyped in C. C++ might use void main()
  15. >>
  16. >>Doesn't ANSI say int main()? At least void main break under some
  17. >>compilers.
  18. >
  19. >ANSI forbids the compiler to provide a prototype for main(), so either
  20. >will compile.  However, ANSI states that main() should be declared one
  21. >of two ways:
  22. >
  23. >   int main(int argc, char *argv[]);
  24. >   int main(void); 
  25. >   (See 2.1.2.2 in the ANSI standard for C for details.)
  26. >
  27. >  *****                    / walker@unx.sas.com
  28. > *|_o_o|\\     Doug Walker<  BIX, Portal: djwalker
  29. > *|. o.| ||                \ AOL: weissblau
  30. >  | o  |//     
  31. >  ====== 
  32.  
  33. Not that it is part of the main()-discussion (which is closed with the last 
  34. SAS-comment), but what is SAS doing at the moment; developing compiler 
  35. systems for other platforms?
  36.  
  37. --
  38. Ruud van Gaal
  39. MarketGraph Visual Automation
  40. E-Mail                : rvg@marketgraph.xs4all.nl
  41. DoomShell 4.5 homepage: http://www.xs4all.nl/~jwkorver
  42. "...Works fascinates me. I could sit and watch it for hours..."
  43.  
  44.